home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 5
/
Apprentice-Release5.iso
/
Demos
/
Bowers Development
/
AppMaker 2.0b5
/
Examples
/
Windows MFC
/
MFC generated
/
Demo1Dlg.cp
< prev
next >
Wrap
Text File
|
1996-01-01
|
3KB
|
144 lines
// Demo1Dlg.cp -- application methods
// Created 01/01/95 12:01 PM by AppMaker
#include "stdafx.h"
#include "Demo1Dlg.h"
#include "mainfrm.h"
#include "CDemo1DlgDoc.h"
#include "CDemo1DlgView.h"
#ifdef _DEBUG
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif
//
// class CDemo1DlgApp
//
BEGIN_MESSAGE_MAP(CDemo1DlgApp, CWinApp)
//{{AFX_MSG_MAP(CDemo1DlgApp)
// Handlers within the section marked by {{AFX_MSG_MAP and }}AFX_MSG_MAP
// are maintained by ClassExpress.
ON_COMMAND(ID_APP_ABOUT, OnAbout)
//}}AFX_MSG_MAP
// Use inherited File/New, File/Open code.
ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
// Use inherited File/Print Setup...
ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
// Global help commands
ON_COMMAND(ID_HELP_INDEX, CWinApp::OnHelpIndex)
ON_COMMAND(ID_HELP_USING, CWinApp::OnHelpUsing)
ON_COMMAND(ID_HELP, CWinApp::OnHelp)
ON_COMMAND(ID_CONTEXT_HELP, CWinApp::OnContextHelp)
ON_COMMAND(ID_DEFAULT_HELP, CWinApp::OnHelpIndex)
END_MESSAGE_MAP()
//
// CDemo1DlgApp constructor
//
CDemo1DlgApp::CDemo1DlgApp()
{
// You can initialize member variables here. Most of the initialization
// code, however, should go into CDemo1DlgApp::InitInstance().
}
// There is only one instance of the CDemo1DlgApp object
CDemo1DlgApp NEAR theApp;
//
// CDemo1DlgApp initialization
//
BOOL CDemo1DlgApp::InitInstance()
{
#if (_MFC_VER >= 0x0300)
Enable3dControls();
#else
EnableVBX();
SetDialogBkColor();
#endif
LoadStdProfileSettings(); // Load information from the .INI
// Register our document templates.
AddDocTemplate(new CSingleDocTemplate(IDR_MAINFRAME,
RUNTIME_CLASS(CDemo1DlgDoc),
RUNTIME_CLASS(CMainFrame),
RUNTIME_CLASS(CDemo1DlgView)));
if (! m_lpCmdLine[0]) {
OnFileNew();
} else {
OpenDocumentFile(m_lpCmdLine);
}
return TRUE;
}
//
// class CAboutDlg
//
class CAboutDlg : public CDialog
{
public:
CAboutDlg();
//{{AFX_DATA(CAboutDlg)
enum { IDD = IDD_ABOUTBOX };
//}}AFX_DATA
// Mapped functions
protected:
DECLARE_MESSAGE_MAP()
virtual void DoDataExchange(CDataExchange *pDX);
//{{AFX_MSG(CAboutDlg)
// Handlers within the section marked by {{AFX_MSG and }}AFX_MSG
// are maintained by ClassExpress.
//}}AFX_MSG
};
CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
{
//{{AFX_DATA_INIT(CAboutDlg)
//}}AFX_DATA_INIT
}
void CAboutDlg::DoDataExchange(CDataExchange *pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CAboutDlg)
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
//{{AFX_MSG_MAP(CAboutDlg)
// Handlers within the section marked by {{AFX_MSG_MAP and }}AFX_MSG_MAP
// are maintained by ClassExpress.
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
void CDemo1DlgApp::OnAbout()
{
CAboutDlg aboutDlg;
aboutDlg.DoModal();
}
// VBX handling
//{{AFX_VBX_REGISTER_MAP()
//}}AFX_VBX_REGISTER_MAP
//
// CDemo1DlgApp commands
//